package book;

public class BookList {
    private Book[] books;//书架上放的书

    private static final int DEFALT_SIZE = 10;//书架的默认大小

    private int usedSize;//书籍的有效个数

    public BookList() {
        this.books = new Book[DEFALT_SIZE];
        //预先放三本书
        this.books[0] = new Book("三国演义","罗贯中",25.14,"三国");
        this.books[1] = new Book("红楼梦","曹雪芹",38.65,"小说");
        this.books[2] = new Book("西游记","吴承恩",23.65,"神话");
        this.books[3] = new Book("水浒传","施耐庵",22.55,"武侠");
        //有效书籍4本
        this.usedSize = 4;
    }

    public Book[] getBooks() {
        return books;
    }

    public void setBooks(Book[] books) {
        this.books = books;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
}
